package org.sheep.sprite;

public abstract class Bullet extends Sprite{
  //pixels per frame
  private int speed;
  
  public void move(Sprite s) {
    if(((position + length) + GAP_TO_OPPONENT)+speed >= s.position)
      position = s.position - GAP_TO_OPPONENT;
    else
      move();
  }

  public void move() {
    position += speed;
  }
  
  public boolean inFrontOfAfterMove(Sprite s) {
    return ((position + length) + GAP_TO_OPPONENT)+speed >= s.position;
  }

  public abstract Bullet clone();
}
